import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import java.util.stream.Stream;

public class Test {
    private static int a;

    public static void main(String[] args) {

        Map<String, String> stringStringMap = helloDebug();
        System.out.println(stringStringMap);
//        myStream();

        a++;
        a++;
        a++;
        a++;
        System.out.println(a);

        MyPhone myPhone = new MyPhone();
        myPhone.insert();
        Computer computer = new Computer();
        computer.insert();

        List<Integer> list = new ArrayList<>();
        for (int i = 0; i < 100; i++) {
            list.add(i);
        }
    }

    public static Map<String, String> helloDebug() {
        Map<String, String> hashMap = new HashMap<>();
        myStream();
        hashMap.put("1", "1");
        hashMap.put("2", "2");
        hashMap.put("3", "3");
        hashMap.put("4", "4");
        return hashMap;
    }

    public static void myStream() {
        List<Integer> collect = Stream.of(1, 2, 3, 4).filter(f -> f > 3).map(m -> m * 2).collect(Collectors.toList());


//        Stream<Integer> integerStream = Stream.of(1, 2, 3, 4).filter(f -> f > 3);
//        Stream<Integer> integerStream1 = integerStream.map(m -> m * 3);
//        List<Integer> collect1 = integerStream1.collect(Collectors.toList());
        System.out.println(collect);
    }
}

interface USB {
    void insert();
}

class Computer implements USB {

    @Override
    public void insert() {
        System.out.println(Thread.currentThread().getName() + "使用USB接口");
//        Integer i1 = null;
//        System.out.println(i1.toString());
    }
}

class MyPhone implements USB {

    @Override
    public void insert() {
        System.out.println(Thread.currentThread().getName() + "使用USB接口");
    }
}